package com.le.tester.imooc.oldimmortal.coding.annotation;

import com.le.tester.imooc.oldimmortal.coding.proxy.Aspect;

/**
 * createTime：2025-05-19 14:54
 * description：切面的时间统计
 */
public class TimeUsageAspect implements Aspect {
    long start;

    @Override
    public void before() {
        start = System.currentTimeMillis();
    }

    @Override
    public void after() {
        long usage = System.currentTimeMillis() - start;
        System.out.format("time usage : %dms\n", usage);

    }
}
